/*电话加星*/
angular.module("app").filter("xing", function() {
	return function(mobile) {
		if(mobile) {
			mobile = mobile.toString()
			return mobile = mobile.substr(0, 3) + "****" + mobile.substr(7, 11)
		} else {
			return mobile
		}

	}
})

/*姓名加星*/
angular.module("app").filter("namex", function() {
	return function(mobile) {
		if(mobile) {
			mobile = mobile.toString()
			return mobile = mobile.substr(0, 1) + new Array(mobile.length).join('*')
		} else {
			return mobile
		}

	}
})

/*银行卡加星*/
angular.module("app").filter("bankx", function() {
	return function(mobile) {
		if(mobile) {
			mobile = mobile.toString()
			return mobile = new Array(mobile.length - 3).join('*') + mobile.substr(-4)
		} else {
			return mobile
		}

	}
})

/*截取2位小数*/
angular.module("app").filter("jiequ", function() {
	return function(mobile) {
		if(mobile) {
			var str=(parseInt(mobile*100)/100.0).toFixed(2)
			str = str.split(".")
			return str[0].replace(/\B(?=(\d{3})+$)/g, ',') + "." + str[1]
		} else {
			return "0.00"
		}

	}
})